local skel = fk.CreateSkill {
  name = "emo__landuo",
}

Fk:loadTranslationTable{
  ["emo__landuo"] = "懒惰",
  [":emo__landuo"] = "出牌阶段限一次，你可以令一名其他角色手牌上限-2并弃置手牌至手牌上限，若其没有弃置牌，你获得1点护甲。",
  ["#emo__landuo-prompt"] = "懒惰:令一名其他角色手牌上限-2并弃置手牌至手牌上限",
}

skel:addEffect("active", {
  anim_type = "control",
  prompt = "#emo__landuo-prompt",
  card_num = 0,
  target_num = 1,
  card_filter = Util.FalseFunc,
  target_filter = function (self, player, to_select, selected)
    return #selected == 0 and to_select ~= player
  end,
  times = function (self, player)
    return 1 - player:usedSkillTimes(skel.name, Player.HistoryPhase)
  end,
  can_use = function(self, player)
    return player:usedSkillTimes(skel.name, Player.HistoryPhase) == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    room:addPlayerMark(to, MarkEnum.MinusMaxCards, 2)
    local x = to:getHandcardNum() - to:getMaxCards()
    if x > 0 then
      if #room:askToDiscard(to, { min_num = x, max_num = x, include_equip = false, skill_name = skel.name, cancelable = false}) > 0 then
        return
      end
    end
    room:changeShield(player, 1)
  end,
})

return skel
